/*
 ------------------------------------------------------------------------------
 Copyright (C) 2013 Eternal Games.

 This file is part of the EternalTech source code.

 The EternalTech source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The EternalTech source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the EternalTech source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// sg_misc.cpp - miscellaneous entities
//


#include "sg_local.h"


/*
 ==============================================================================

 LIGHT_FLUORO

 ==============================================================================
*/


/*
 ==============================================================================

 LIGHT_FLUOROSPARK

 ==============================================================================
*/


/*
 ==============================================================================

 LIGHT_GLOBE

 ==============================================================================
*/


/*
 ==============================================================================

 LIGHT_FLAME_SMALL_YELLOW

 ==============================================================================
*/


/*
 ==================

 NOTE: uses a model and sound
 ==================
*/
void SG_LightFlameSmallYellow_Spawn (etEntity *self){

	general_t	*general = (general_t *)self->state.buffer;

	// Parse all the spawn parameters that will be transmitted to clients
	self->ParseGeneralState();

	// Get the audible range
	self->audibleRange = self->spawnDict.GetFloat("audibleRange", "2500");
	self->audibleRange = Max(self->audibleRange, 0.0f);

	// Get the sound shader

	// Finish setting up
	if (general->model)
		self->flags |= FL_VISIBLE;

	if (self->soundShader)
		self->flags |= FL_AUDIBLE;

	// Set the clip model

	// Enable physics
	self->EnablePhysics();
}


/*
 ==============================================================================

 LIGHT_FLAME_LARGE_YELLOW

 ==============================================================================
*/


/*
 ==================

 ==================
*/
void SG_LightFlameLargeYellow_Spawn (etEntity *self){

	general_t	*general = (general_t *)self->state.buffer;

	// Parse all the spawn parameters that will be transmitted to clients
	self->ParseGeneralState();

	// Get the audible range
	self->audibleRange = self->spawnDict.GetFloat("audibleRange", "2500");
	self->audibleRange = Max(self->audibleRange, 0.0f);

	// Get the sound shader

	// Finish setting up
	if (general->model)
		self->flags |= FL_VISIBLE;

	if (self->soundShader)
		self->flags |= FL_AUDIBLE;

	// Set the clip model

	// Enable physics
	self->EnablePhysics();
}


/*
 ==============================================================================

 LIGHT_FLAME_SMALL_WHITE

 ==============================================================================
*/


/*
 ==================

 ==================
*/
void SG_LightFlameSmallWhite_Spawn (etEntity *self){

	general_t	*general = (general_t *)self->state.buffer;

	// Parse all the spawn parameters that will be transmitted to clients
	self->ParseGeneralState();

	// Get the audible range
	self->audibleRange = self->spawnDict.GetFloat("audibleRange", "2500");
	self->audibleRange = Max(self->audibleRange, 0.0f);

	// Get the sound shader

	// Finish setting up
	if (general->model)
		self->flags |= FL_VISIBLE;

	if (self->soundShader)
		self->flags |= FL_AUDIBLE;

	// Set the clip model

	// Enable physics
	self->EnablePhysics();
}


/*
 ==============================================================================

 LIGHT_TORCH_SMALL_WALLTORCH

 ==============================================================================
*/


/*
 ==================

 ==================
*/
void SG_LightTorchSmallWallTorch_Spawn (etEntity *self){

	general_t	*general = (general_t *)self->state.buffer;

	// Parse all the spawn parameters that will be transmitted to clients
	self->ParseGeneralState();

	// Get the audible range
	self->audibleRange = self->spawnDict.GetFloat("audibleRange", "2500");
	self->audibleRange = Max(self->audibleRange, 0.0f);

	// Get the sound shader

	// Finish setting up
	if (general->model)
		self->flags |= FL_VISIBLE;

	if (self->soundShader)
		self->flags |= FL_AUDIBLE;

	// Set the clip model

	// Enable physics
	self->EnablePhysics();
}

/*
 ==============================================================================

 MISC_FIREBALL

 ==============================================================================
*/


/*
 ==============================================================================

 MISC_EXPLOBOX

 ==============================================================================
*/


/*
 ==============================================================================

 MISC_EXPLOBOX2

 ==============================================================================
*/


/*
 ==============================================================================

 MISC_NOISEMAKER

 ==============================================================================
*/